package day10.KeJian;

import java.util.TreeSet;

public class TreeSetDemo {
    public static void main(String[] args) {
        TreeSet<Student> t = new TreeSet<>();
        Student s1 = new Student("zhangsan",94,85,77);
        Student s2 = new Student("lisi",99,75,61);
        Student s3 = new Student("wangwu",57,87,99);

        t.add(s1);
        t.add(s2);
        t.add(s3);
        for (Student ss : t) {
            System.out.println(ss.getName()+","+ss.getChinese()+","+ss.getEnglish()+","+ss.getMath()+","+ss.getSum());

        }
    }
}
